home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu216.dms / pu216.adf / WBase / WBase.doc < prev    next >
Text File  |  1989-08-17  |  26KB  |  586 lines

  1.  
  2.  
  3.  
  4.                 WBase V1.3 - Finished 24 May 1992
  5.  
  6.  
  7.                         © 1992 Simon Dick
  8.  
  9.  
  10.  
  11.  
  12. WBase now now needs reqtools.library to run, this is because I decided that
  13. the GFA-BASIC built in versions of some of ReqTools commands took up too much
  14. space. Also if it can find it, WBase uses kd_freq.library for its file
  15. requester instead of the ReqTools version if it is found,but you are able to
  16. choose which you want to use. If the powerpacker.library is found then it is
  17. used to decrunch files. The file FR_User.doc is the manual for the kd_freq
  18. file requester.
  19.  
  20. This program is Freeware which means that you can copy it and give it to
  21. anybody you want as long as you don't ask for any money for it except perhaps
  22. a small amount for disks and copying and that you don't need to send me any
  23. money to use it (but I wouldn't mind if you did, and you would get the next
  24. couple of versions). You aren't allowed to commercially sell any version of
  25. WBase! Well at least not without my permission.
  26.  
  27.  
  28. About WBase
  29. ===========
  30.  
  31.    I wrote this because I kept on finding that I needed to quickly use a
  32. database on Workbench, but all of the others which I have got all took up too
  33. much space on the Workbench for my liking so I thought that I might as well
  34. write my own as I had already written a database in AmigaBasic but which was
  35. much to slow to be really useful so I started to convert it to GFA Basic when
  36. I got it, but soon gave up and just rewrote it from scratch, here is the
  37. result. This will run if you have only half meg but will be most useful with
  38. more memory, as it takes up about 260K. I haven't been able to test this out
  39. thoroughly with Kickstart 2.0 yet, but I believe that it works though. I'm not
  40. responsible for any data which is lost or any damage which is caused due to
  41. any problems though.
  42.    I never thought that I would actually do more than one version of WBase,
  43. and here I am working on the third released version!
  44.  
  45. The Menus
  46. =========
  47.  
  48. File
  49.  
  50.    New -   This lets you create a new database in memory. You can have a
  51.            maximum of 20 fields and a maximum of 300 records. After finding
  52.            out how big a database you want it them goes and asks you for each
  53.            fieldname one at a time. If you use every single character in each
  54.            field and use ten fields then you will only be able to use 150
  55.            records, so it stands to reason that you will probably be able to
  56.            use five fields and 300 records.
  57.    Load -  This lets you load a previously saved data file. It handles both
  58.            crunched and uncrunched files . It also does a bit of checking to
  59.            make sure that the file is valid.
  60.    Save
  61.       Crunched   - This saves a crunched version of the data which is
  62.                    currently stored in the memory. This only works if you
  63.                    have version 35 or above of powerpacker.library installed.
  64.                    It crunches it with best efficiency with a medium speedup
  65.                    buffer if you are interested.
  66.       Uncrunched - This just saves out the data stored in the memory as an
  67.                    ASCII file which you can easily edit in any text editor if
  68.                    you don't like the editing in WBase. There is a section on
  69.                    that later on.
  70.    Delete- This simply lets you delete a file from a disk, it hasn't got
  71.            anything to do with deleting records from memory.
  72.    About - Tells you stuff like my address and the version of WBase.
  73.    Quit -  This lets you exit from WBase (why would you want to do that ?).
  74.            You can also do this by clicking on the close gadget, pressing
  75.            escape or pressing 'Q' while the window is active.
  76.  
  77.  
  78. Edit
  79.  
  80.    Record -   This lets you change the data which has already been entered
  81.               into memory.
  82.    Fieldname- This lets you change any of the current fieldnames.
  83.    Delete
  84.       All            - If you select this it erases all of the records which
  85.                        where stored in memory (after making sure you didn't
  86.                        accidentally select it).
  87.       Section        - This lets you delete a section of records from memory
  88.                        (eg. from 1 to 14 or 102 to 324).
  89.       Single record  - This lets you delete a single record, unfortunately
  90.                        you need to know the actual record number beforehand
  91.                        though (another way to delete a single record is to
  92.                        view it and press 'D' to delete it).
  93.  
  94.  
  95. View
  96.  
  97.    All     - This lets you look through all of you records one by one. There
  98.              are the following options:
  99.                 F - Goes forward one record
  100.                 P - Prints the current record
  101.                 B - Goes back one record
  102.                 M - Lets you mark and unmark a record
  103.                 G - Lets you jump straight to a record by the record number
  104.                 D - Lets you delete the current record
  105.                 E - Lets you edit the current record
  106.              The left cursor key moves you back a record and the right cursor
  107.              key moves you forward one record. The up cursor moves to the end
  108.              of the file while the down cursor key moves to the beginning.
  109.    Section - This is done in the same way as the Delete Section (I mean by
  110.              entering the start and finish record numbers not by deleting the
  111.              records!) apart from that it has the same options as for View
  112.              All.
  113.    Single  - You type in the number of the record that you want to view. It
  114.              has the following options:
  115.                 P - Prints the current record
  116.                 F - } these don't do anything
  117.                 B - }
  118.                 M - Lets you mark a record
  119.                 D - Lets you delete the current record
  120.                 E - Lets you edit the current record
  121.                 Q - Lets you quit to the menu
  122.              The cursor keys also move you through it in the same way as in
  123.              View All.
  124.    Marked  - This lets you view all of the records which you have marked and
  125.              has the same options as View Single has.
  126.  
  127.  
  128. Print (this menu can be disabled by using the Printer menu item, see later
  129.        for more information)
  130.  
  131.    All     - If you select this then WBase will ask you if you are ready to
  132.              print before printing each record and also allowing you to
  133.              cancel printing that record.
  134.    Section - The same as the above except for being able to choose a section
  135.              of records to view.
  136.    Single  - This lets you view a single records by record number.
  137.    Marked  - This lets you print all of the previously marked records.
  138.  
  139.  
  140. Sort
  141.  
  142.    All     - All that you need to tell this options is what field you want the
  143.              whole file to be sorted by.
  144.    Section - This works the same as the above except that it asks for start
  145.              and finish record numbers as well and it only sorts the records
  146.              between those numbers (inclusive).
  147.  
  148.  
  149. Misc.
  150.  
  151.    Input Record    - This is one of the more important functions as it allows
  152.                      you to enter data into the data file which is currently
  153.                      in memory. It opens a window and shows you previously
  154.                      entered data. It also now works for multiple records
  155.                      being input, to cancel input press the Cancel gadget.
  156.                      WARNING: if you press Cancel while it is on the last
  157.                               field of the record then the whole record will
  158.                               be wiped. You should OK the last field and then
  159.                               Cancel the first field on the next record.
  160.    Search for data - This is mostly pretty straight forward except for one
  161.                      part, that is when it asks you for the field to search
  162.                      in, if you enter 0 there then it searches through all
  163.                      of the fields and not just by one. This has the same
  164.                      options as View Single has except that 'F' and 'B' go
  165.                      forward and backwards.
  166.    Palette         - This option will bring up a palette requester. Not much
  167.                      point to having it in a database but it only added a few
  168.                      lines so I thought I might as well put it in.
  169.    Printer         - This simply toggles whether or not the Printer menu will
  170.                      be enabled or not. If there is a tick next to it then it
  171.                      is enabled.
  172.    Command         - If you select this it allows you to run programs from
  173.                      within WBase. If you run this from either CLI or
  174.                      workbench it will display all output in a tiny window in
  175.                      the top left of the screen, which means that it is now
  176.                      alright to use the ARP 'ARun WBase NOIO' command as it
  177.                      doesn't try to write to the CLI. Also if you can't
  178.                      remember (or can't be bothered to type in) a command
  179.                      then you can type in '*' and you can select the command
  180.                      using a file requester, after you have selected it you
  181.                      are given the chance to add extra options to it. You also
  182.                      need the Run command in the C: directory.
  183.    Shrink/Expand   - This is a toggle switch which lets you swap between
  184.                      a full screen version of WBase and the original 'Shrunk'
  185.                      version. This can be handy if your Workbench is getting
  186.                      a bit crowded.
  187.    File Requesters
  188.       KD_FReq  - This chooses the file requester from kd_freq.library to be
  189.                  used for all file selections, it has a tick next to it if it
  190.                  is selected. I personally prefer this requester.
  191.       ReqTools - This chooses the file requester from reqtools.library to
  192.                  be used for all file selections, it has a tick next to it if
  193.                  is selected.
  194.       Asl req  - This chooses the file requester from asl.library. This is
  195.                  ghosted if you are running less than WB2.0 because the
  196.                  requester only works on WB2.x. Because of that I haven't been
  197.                  able to test it as I have got WB1.3, it is based on an
  198.                  example piece of code though so it should work. I don't know
  199.                  how to use any extra features, just how to call it and get
  200.                  the filename!
  201.  
  202.  
  203. Gadgets
  204. =======
  205.    In version 1.3 of WBase I have added gadgets to WBase in its expanded mode,
  206. the size of WBases screen depends on you WB screen. For example, if you are an
  207. NTSC user then WBase will open a NTSC screen (640x200) and if you are a PAL
  208. user, then WBase will open a PAL screen (640x256). If you are running in
  209. Interlace then WBase will open an interlaced screen (either 640x400 or
  210. 640x512). WBase finds out what screen mode you are using by finding out the
  211. vertical size if your WB screen and choosing the screen which is closest.
  212. WBase only supports Productivity mode if your Workbench is either 480 or 960
  213. pixels high.
  214.   The gadgets are in the following order from left to right:
  215.     File - Load, save and delete
  216.     Input record
  217.     View
  218.     Sort
  219.     Search
  220.     Print
  221.     Command
  222.     Quit
  223.   They aren't exactly very obvious what each one is. If anyone can do a better
  224. job of them please can you send me your own version of them. They must be 80
  225. pixels across by 32 pixels down or less. I will choose the best ones and use
  226. them in the next version.
  227.  
  228.  
  229.  
  230. Other Features
  231. ==============
  232.  
  233.  - WBase scans some possible places which viruses may attach themselves to,
  234.    they are only checked when WBase is loaded. I don't make any claim that
  235.    WBase can replace a virus killer (because I know it can't!). It may not be
  236.    viruses which alter the vectors as it could be things like real virus
  237.    killers, recoverable ram drives, PPLoadSeg, etc. So be careful if you
  238.    agree to clear anything.
  239.  - WBase tries to trap guru meditations, so that you should be able to save
  240.    your data before the computer crashes. I haven't managed to test it as
  241.    Amigas never guru when you want to them, do they? I am not sure if it works
  242.    with KS2.0 though as I haven't got it (yet).
  243.  - WBase supports crunched files as long as you have powerpacker.library V33+
  244.    installed. I haven't implemented it very well though as I can't read the
  245.    file straight from memory, so that it needs to save the decrunched file to
  246.    somewhere. It tries places in this in order - T:, RAM:, DF0:. I am planning
  247.    to change this soon though.
  248.  
  249.  
  250.  
  251. ARexx Interface
  252. ===============
  253.  
  254.   In this version I just added an ARexx interface (which I had been planning
  255. to do for a while). I haven't actually got ARexx (or WB2.0) so I haven't been
  256. able to test it out, so if you find any bugs please could you report them as
  257. quickly as possible so that I can fix them.
  258.   For the ARexx interface too work you need rexxhost.library (which should be
  259. included with WBase) and rexxsyslib.library in the LIBS: directory. You will
  260. also need to run RexxMast to be able to send commands to WBase.
  261.  
  262. Here is the list of commands that WBase supports:-
  263.  
  264.     ABOUT
  265.         Just brings up the About requesters. I doubt if you will use
  266.         this, but I put in just in case.
  267.  
  268.     CHANGEFREQ <1|2|3>
  269.         This lets you change the default file requester. Number one is
  270.         kd_freq, number two is reqtools and number three is Asl.
  271.  
  272.     CURFREQ
  273.         This returns the number of the file requester that it being
  274.         used. At the moment three are used, number one is kd_freq,
  275.         number two is reqtools and number three is Asl.
  276.  
  277.     DELETE <record number>
  278.         This lets you delete a single record. You are asked for
  279.         confirmation first.
  280.  
  281.     DELETEALL
  282.         This is exactly the same as 'Delete All' in the menus.
  283.  
  284.     DELETESEC <start record> <end record>
  285.         This allows you to delete a section of records between start
  286.         and end inclusive.
  287.  
  288.     EDIT <record number>
  289.         This lets you edit the specified record in the usual manner.
  290.  
  291.     EDITFIELD [field number]
  292.         This lets you either edit all of the fields or just the one
  293.         specified.
  294.  
  295.     EXEC <command>
  296.         This automatically runs the command. The Run command is needed
  297.         in the C: directory.
  298.  
  299.     EXPAND
  300.         This 'enlarges' WBase from its Workbench window to its full
  301.         screen mode.
  302.  
  303.     FILEREQ <title>
  304.         This is for you own use. It returns the selected filename in
  305.         'result'.
  306.  
  307.     FRONTW
  308.         This simply brings either the shrunk window or the full screen
  309.         to the front and activates it.
  310.  
  311.     INPUT
  312.         This brings up requesters to allow you to input records in the
  313.         normal way.
  314.  
  315.     KILL [filename]
  316.         This lets you delete a file. If you don't specify a filename
  317.         then the current file requester will appear to allow you to
  318.         select a file.
  319.  
  320.     LOAD [filename]
  321.         This allows you to load a data file. If you don't provide a
  322.         filename then the current file requester will appear to allow
  323.         you to select a file.
  324.  
  325.     MAXFIELDS
  326.         This returns the number of fields used in the current data
  327.         file. It is returned in 'result'.
  328.  
  329.     MAXRECS
  330.         This returns the maximum number of records which can be used.
  331.         It is returned in 'result'.
  332.  
  333.     NEW
  334.         This is the same as 'New' in the File menu. It pops up
  335.         requesters to find out the data at the moment. I may add the
  336.         option to create a new database totally from ARexx in the next
  337.         version if that's what people want.
  338.  
  339.     PALETTE
  340.         This brings up a colour requester. It returns the colour
  341.         selected as the result.
  342.  
  343.     PRINT <record number>
  344.         This allows you to print out a single record.
  345.  
  346.     PRINTALL
  347.         This is exactly the same as 'Print All' in the menus.
  348.  
  349.     PRINTSEC <start record> <end record>
  350.         This prints out a section of records between start and end
  351.         inclusive. Before printing each record you are asked to
  352.         confirm the printing of that record.
  353.  
  354.     PRTMENU <ON|OFF>
  355.         This lets you enable and disable the Printer menu. 'PRTMENU
  356.         ON' enables the menu and 'PRTMENU OFF' disables the menu.
  357.  
  358.     QUIT
  359.         Allows you to quit from WBase using ARexx. It does the same as
  360.         'Quit' in the menu does, except that it doesn't ask for any
  361.         confirmation even if you have an altered database, so be
  362.         careful.
  363.  
  364.     RECSUSED
  365.         This returns the number of records which have been used in the
  366.         current database. It is returned in 'result'.
  367.  
  368.     SAVE [filename]
  369.         This allows you to save a data file. If you don't provide a
  370.         filename then the current file requester will appear to allow
  371.         you to select a file.
  372.  
  373.     SEARCH <string>
  374.         This searches the whole database (in every field) for the
  375.         string that you supplied and displays it in the normal way.
  376.  
  377.     SHRINK
  378.         This reduces WBase from its full screen mode to its Workbench
  379.         window mode.
  380.  
  381.     SORTALL <field number>
  382.         This sorts the whole file by the field number specified.
  383.  
  384.     SORTSEC <field number> <start record> <end record>
  385.         This sorts a section of the file (between start and end
  386.         inclusive) by the field number specified.
  387.  
  388.     VERSION
  389.         This returns what version of WBase this is. It could be
  390.         useful later if I add new ARexx commands and you want to know
  391.         if the version of WBase which is running supports them. The
  392.         version number is returned in 'result'.
  393.  
  394.     VIEW <record number>
  395.         This simply lets you view a single record, the same as 'View
  396.         Single' in the menus does.
  397.  
  398.     VIEWALL
  399.         This is exactly the same as 'View All' in the menus.
  400.  
  401.     VIEWSEC <start record> <end record>
  402.         This allows you to view a section of records between start and
  403.         end inclusive.
  404.  
  405.  
  406.  
  407. WBase file format
  408. =================
  409.  
  410. This section is for anybody who either wants to allow their database to load
  411. in WBase files or anyone who wants to be able to change things like the
  412. maximum number of records available in a file.
  413. Lets suppose that you created a database with three fields:
  414.     Name
  415.     Age
  416.     Address
  417. And you said that you wanted a maximum space for ten records. If you did that
  418. then here is what the data file will look like:
  419.  
  420. WB10,2,3
  421. Name
  422. Age
  423. Address
  424. John Smith
  425. 46
  426. London
  427.  
  428. The WB at the beginning is WBases check to make sure that it is a WBase file.
  429. The ten is the maximum number of records and the two is the number of records
  430. which have been used with one added onto it. The three is the number of
  431. fields which the database has. It doesn't matter how many characters the
  432. numbers take up as long as they have a comma separating them.The next three
  433. lines are the field names, the number of lines depends on how many fields you
  434. have put in before. There aren't any quotes around the fieldnames or data
  435. because they are a bit pointless. The data is listed after the fieldnames in
  436. the same format. One note: if you leave spaces on either side of the text it
  437. gets stripped away as soon as it is loaded into WBase. In later versions of
  438. WBase, if I need to save more data then I will save it at the end of current
  439. files, so that files saved by previous versions will still be able to be
  440. read.
  441.  
  442.  
  443. Possible future improvements
  444. ============================
  445.  
  446.    
  447.     - Including graphics as fields (what do you think? And how could it
  448.       work?).
  449.     - Reading a powerpacked file straight from memory instead of from a
  450.       temporary file.
  451.     - Using a disk based file instead of keeping it in memory or
  452.       dynamically allocating memory as I need it instead of reserving
  453.       about 200K at the start. I think I know how I could do this in
  454.       theory (it's very hard from GFA-BASIC though, as the standard way of
  455.       getting more memory wipes out all current data).
  456.     - Any necessary bug fixes
  457.     - Any other suggestions that you make.
  458.     (Please suggest something as I am running out of ideas !!! I will
  459.          attempt to include it if it is sensible enough.)
  460.  
  461.  
  462.  
  463. Please send any bug reports, ideas about improvements,criticism
  464. (constructive), and anything else to:
  465.  
  466.  
  467.                         Simon Dick,
  468.                         31 Salisbury Road,
  469.                         Bexley,
  470.                         Kent DA5 3QE,
  471.                         England
  472.  
  473.  
  474. Just a warning, but if nobody sends me any ideas then there may not be any
  475. future upgrades for WBase, unless I can think of some other things to add.
  476.  
  477. I will also be happy to try to help you if you can't work some function out,
  478. both in WBase and GFA-Basic (most commands), just write to me and I will try
  479. to help you out.
  480.  
  481.  
  482. If anyone is interested, I have just finished writing a test version of WNet,
  483. a file sender which works through the serial port, it also allows the sending
  484. of messages and commands, you can also get files from the other computer. If
  485. anyone would like to test it for me, I can't as I only have one Amiga, please
  486. send a disk and postage and I will send you the test version.
  487.  
  488.  
  489.  kd_freq.library is Copyright 1990,1991 Khalid Aldoseri.
  490.  powerpacker.library and reqtools.library are Copyright Nico François.
  491.  Thanks to Olaf Barthel for his rexxhost.library without which WBase probably
  492. wouldn't have an ARexx interface!
  493.  
  494. Changes from V1.2
  495. =================
  496.  
  497.  - I made WBase totally dependent on the reqtools.library instead of it being
  498.    an optional extra, which also decreased the size by about 10K because I
  499.    didn't need to use some GFA-Basic functions which increased the size. I
  500.    have more than made up for that with other stuff though!
  501.  - I worked around the bug in the previous version which wouldn't allow you
  502.    to move the window or use any of the system gadgets on the WBase window by
  503.    opening the window once, closing it and then opening it again. It's an
  504.    awkward method, but it works!
  505.  - I decided to give the user a choice of which file requester to use. There
  506.    are three choices, the kd_freq.library requester (which comes up as the
  507.    default if you have it), the asl.library or the reqtools.library requester
  508.    which is always available.
  509.  - I decided to use the GetLongA function of ReqTools to input the numbers
  510.    instead of getting a string and converting it. This helped make WBase a
  511.    tiny bit smaller as now I don't need to do any range checking for those
  512.    sections.
  513.  - I fixed a small bug which occurred when you chose a command from the file
  514.    requester which had a space in its path. It looked for the first section
  515.    before the space, it now puts quotes around it and treats it all as a
  516.    command.
  517.  - Got rid of the annoying quotes around the different fields in the saved
  518.    file. So you can load up files from previous versions, when WBase comes
  519.    across an entry with quotes on either side it strips them off as well as
  520.    any extra spaces on either side.
  521.  - Added the option of turning it into a full screen (well, sort of anyway!)
  522.    database with gadgets.
  523.  - Fixed a bug in the search routine which recorded more than one occurrence
  524.    of the pattern in the same record and for some reason displayed the
  525.    fieldnames as well occasionally.
  526.  - Changed WBase so that it now doesn't save an icon with each data file.
  527.  - Altered the method which I used to edit the fieldnames, instead of asking
  528.    which field you want to edit it goes through all the fields allowing you
  529.    to edit them.
  530.  - Now when you input records you can see the previous fields which you have
  531.    typed in and also it automatically continues asking you for more files
  532.    until you press cancel, which will delete the record you are currently on
  533.    so it is best if you start a new record and then press cancel.
  534.  - Removed the old method of choosing the number of fields because of the
  535.    increased maximum number of fields.
  536.  - Added checks for some more vectors in the virus checker section. Some of
  537.    them I can't fix as I don't know what they were originally, so you are only
  538.    told about them.
  539.  - I removed the option to save a PowerPacked file as I don't really see the
  540.    point of having it included as you can easily crunch the file with
  541.    PowerPacker after saving it normally. WBase still supports loading crunched
  542.    files though.
  543.  - I finally added an ARexx interface to WBase. I can't test it as I haven't
  544.    got ARexx. If anyone finds any bugs in it please could you report them too
  545.    me as soon as possible as I will probably start work on the new version
  546.    quite soon after this is released.
  547.  
  548. Changes from V1.1
  549. =================
  550.  
  551.  - I added support for reqtools.library instead of the old req.library.
  552.  - A much better file requester thanks to reqtools.library.
  553.  - The search printed the records into the small window instead of opening
  554.    a new window for it.
  555.  - The 'Print Section' and 'Print Single' weren't actually included
  556.    accidentally.
  557.  - Before, if you tried to load a crunched file which wasn't a WBase file it
  558.    wouldn't delete it from disk which meant that you had a file called WB.tmp
  559.    floating around somewhere.
  560.  - You can now go forward AND backwards in the view and search sections.
  561.  - You can now exit from viewing a section.
  562.  - Some functions didn't let you cancel them, this is fixed now.
  563.  - If you select cancel after selecting 'New' your file is now kept.
  564.  - You are asked if you are ready to print before printing each record.
  565.  - Changed the position of the window slightly as it got in my way.
  566.  - You can now delete records while you are viewing.
  567.  - You can also go to records while you are viewing all or a section.
  568.  - And you can even edit records while you are viewing them instead of having
  569.    to remember which number they where.
  570.  - I have included the option of marking records. You mark records while you
  571.    are viewing and you can then go back and either view or print the marked
  572.    records. When you delete records the marks are all cleared.
  573.  - If you have reqtools.library installed then choosing how many fields you
  574.    want is made much easier (try it).
  575.  - You now have the option of crunching files before you save them to disk.
  576.    This only works if you have V35+ of powerpacker.library installed. (It
  577.    should have been included with this program)
  578.  - Apart from using the menu to quit you can also press escape or 'Q'.
  579.  - WBase is now more multitasking friendly. In previous versions it just used
  580.    a loop to check the menus, etc., but now it uses Wait() to wait for them.
  581.    It also seems slightly faster this way as well.
  582.  - The file requester remembers the last file and last directory which were
  583.    used and puts them ready in the next file requester.
  584.  - WBase can now use the kd_freq.library file requester if reqtools.library
  585.    isn't found.
  586.